﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Ags.MonsterTools.Common;
using Microsoft.Practices.Prism.Modularity;
using Microsoft.Practices.Unity;

namespace Ags.MonsterTools.Guids
{
    public class GuidModuleLoader : IModule
    {
        private readonly IViewManager _vm;
        private readonly IUnityContainer _container;

        public GuidModuleLoader(IViewManager vm, IUnityContainer container)
        {
            _container = container;
            _vm = vm;
        }

        public void Initialize()
        {
            _container.RegisterType<GuidView>("GUID", new ContainerControlledLifetimeManager());
            _vm.NavigateToView(typeof(GuidView), RegionConstants.MAINCONTENTREGION, "Guid");
        }
    }
}
